<link rel="stylesheet" type="text/css" href="__PUBLIC__/javascripts/admin/jQuerycxColor/css/jquery.cxcolor.css" />
<script type="text/javascript" src="__PUBLIC__/javascripts/admin/jQuerycxColor/js/jquery.cxcolor.min.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
       $("#color_a").cxColor({
         color: '{$vote['color']}'
       });
    });
</script>
<div class="contentArea">
    <div class="Item hr">
        <div class="current">编辑投票选项</div>
    </div>
    <form>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table1">
            <tr>
                <th width="100">名称：</th>
                <td><input name="vote[name]" type="text" class="input" size="50" maxlength="100" value="{$vote['name']}" /></td>
            </tr>
            <tr>
              <th width="100">颜色值：</th>
              <td>
                <input id="color_a" name="vote[color]" type="text" class="input_cxcolor" readonly>
              </td>
            </tr>
            <tr>
              <th width="100">投票数：</th>
              <td>
                <input type="number" name="vote[count]" class="input" size="30" value="{$vote['count']}" />
              </td>
            </tr>
            <tr>
              <th width="100">排序：</th>
              <td>
                <input type="number" name="vote[sort]" class="input" size="10" maxlength="10" value="{$vote['sort']}" />
              </td>
            </tr>
            <input type="hidden" name="vote[id]" value="{$vote['id']}" />
        </table>
    </form>
    <div class="commonBtnArea">
        <button class="btn submit">提交</button>
    </div>
</div>

<script type="text/javascript">
    $(".submit").click(function() {
        commonAjaxSubmit("{:U('Vote/update')}");
        return false;
    });
</script>